import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
  adminCurrentIndex: -1,
  studentCurrentIndex: -1,
  teacherCurrentIndex: -1,
  avatarPath: "",
}
export default new Vuex.Store({
  state,
  mutations: {
    setCurrentIndex(state, payload) {
      state[payload.type] = payload.index
    },
    setAvatarPath(state, payload) {
      state.avatarPath = payload
    }
  },
  actions: {},
  modules: {}
})